{let root_node=fetch( content, node, hash( node_id, 2 ) )
         menuitems=fetch( content, list, hash( parent_node_id, 2,
         'attribute_filter', array( array( 'priority', '>=', 0 ) ),
                                               class_filter_type, include,
                                               class_filter_array, array('folder','link','page','feedback_form','video_page', 'live_page'),
                                               sort_by, $root_node.sort_array ) )
show=true()}
    <ul id="nav">
		{let root_node_selected=count( $module_result.path )|lt(2)}
		<li {$root_node_selected|choose( '', 'class="active"' )}><a href={$root_node.url_alias|ezurl}>{$root_node.name|wash}</a></li>
		{/let}
    {section var=menu loop=$menuitems}
            {let selected=and( count( $module_result.path )|gt(1), eq( $module_result.path[1].node_id, $menu.node_id ) )}
			{if and(eq( $menu.object.content_class.identifier, "folder" ), $menu.data_map.hide_in_menu.data_int)}
			{set $show = false()}
			{else}
			{set $show = true()}
			{/if}
			{if $show}
            {section show=eq( $menu.object.content_class.identifier, "link" )}
                <li {$selected|choose( '', 'class="active"' )}><a href={$menu.data_map.location.content|ezurl} target="_blank">{$menu.object.name|wash}</a></li>
            {section-else}
                {section show=eq( sum( $menu.index, 1 ), $menuitems|count )}
                <li class="last {$selected|choose( '', 'active' )}"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></li>
                {section-else}
                <li {$selected|choose( '', 'class="active"' )}><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></li>
                {/section}
            {/section}
{/if}
            {/let}
    {/section}
    </ul>
    {/let}


